<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>火车票搜索结果</title>
    <link rel="stylesheet" href="../../../css/iconfont/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="../../../css/aui.css" />
    <link rel="stylesheet" href="../../../script/swiper/swiper.min.css">
    <link rel="stylesheet" href="../../../css/index/aircraft/ticket_list.css">
    <link rel="stylesheet" href="../../../css/index/train/train_result.css"/>
    <link rel="stylesheet" href="../../../css/index/hotel/date.css">
    <style>
        i {
            font-size: 25px !important;
        };
    </style>
</head>

<body style="cursor: pointer">

    <header class="aui-bar aui-bar-nav" style="background: #3CB0D6;" id="header">
        <a class="aui-pull-left aui-btn" onclick="closeWin()">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title"><em class="train_start"></em>-<em class="train_end"></em></div>
    </header>
    <footer class="aui-bar aui-bar-tab" id="footer">
        <div class="aui-bar-tab-item aui-active" tapmode>
            <i class="iconfont icon-diqiu-copy"></i>
            <div class="aui-bar-tab-label">全部</div>
        </div>
        <div class="aui-bar-tab-item" tapmode>
            <i class="iconfont icon-gt"></i>
            <div class="aui-bar-tab-label">高铁</div>
        </div>
        <div class="aui-bar-tab-item" tapmode>
            <i class="iconfont icon-dc"></i>
            <div class="aui-bar-tab-label">动车</div>
        </div>
    </footer>

</body>
<script src="../../../script/aui/api.js"></script>
<script src="../../../script/aui/aui-toast.js" ></script>
<script src="../../../script/extend/jquery-3.3.1.min.js"></script>
<script src="../../../script/widget/swiper.min.js"></script>
<script src="../../../script/widget/js-time.js"></script>
<script src="../../../script/aui/aui-dialog.js" ></script>
<script src="../../../script/extend/date.js"></script>
<script src="../../../script/config.js"></script>
<script src="../../../script/common.js"></script>
<script src="../../../script/aui/aui-tab.js"></script>
<script type="text/javascript">
    apiready = function() {
        api.parseTapmode();
        //step1:传参
        let pageParam = api.pageParam;
        let train_start = pageParam.train_start;
        let train_end   = pageParam.train_end;
        let train_date  = pageParam.train_date;
        let selected_staff  = api.pageParam.selected_staff;
        //step2:头部赋值
        $('.train_start').text(train_start);
        $('.train_end').text(train_end);
        //暂时注释   zhugeng 2018-09-05
        //step3:打开
        // initHeader('train_result',{
        //     train_start:train_start,
        //     train_end:train_end,
        //     train_date:train_date,
        //     selected_staff: selected_staff
        // });
        var header = $api.byId('header');
        $api.fixStatusBar(header);
        $api.fixTabBar($api.byId('footer'));
        api.openFrame({
            name: 'train_result_frm',
            url: './train_result_frm.html',
            rect: {
                x: 0,
                y: $api.byId('header').offsetHeight,
                w: 'auto',
                h: api.winHeight - $api.byId('header').offsetHeight - $api.byId('footer').offsetHeight
            },
            pageParam: {
                train_start : train_start,
                train_end : train_end,
                train_date : train_date,
                selected_staff : selected_staff
            },
            // bounces: true,
            bgColor: 'rgba(0,0,0,0)',
            vScrollBarEnabled: true,
            hScrollBarEnabled: true
        });
        var tab = new auiTab({
            element: document.getElementById("footer"),
            index: 1,
            repeatClick: false
        }, function(tab) {
            var index = 1;
            switch (tab.index) {
                case 1:
                    index = 1;
                    break;
                case 2:
                    index = 2;
                    break;
                case 3:
                    index = 3
                    break;
            }
            //发送监听
            api.sendEvent({
                name: 'train_index',
                extra: {
                    index: index,
                }
            });
        });
    };
</script>
</html>
